package com.wsj.neo4j.simple.mds.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.neo4j.ogm.annotation.GeneratedValue;
import org.neo4j.ogm.annotation.Id;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Relationship;

import java.io.Serializable;
import java.util.List;

/**
 * @author WangSongJun
 * @date 2019-10-28
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@NodeEntity(label = "Company")
public class Company implements Serializable {
    @Id
    @GeneratedValue
    private Long id;
    private String name;


    @Relationship(type = "子公司")
    private List<Company> subCompany;
}
